using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;using Maxleaf.EDI.Domain.K3;

namespace Maxleaf.EDI.DataAccess.K3
{
    public class t_SupplierMap : EntityTypeConfiguration<t_Supplier>
    {
        public t_SupplierMap()
        {
            // Primary Key
            this.HasKey(t => t.FItemID);

            // Properties
            this.Property(t => t.FItemID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.FAddress)
                .HasMaxLength(255);

            this.Property(t => t.FCity)
                .HasMaxLength(80);

            this.Property(t => t.FProvince)
                .HasMaxLength(80);

            this.Property(t => t.FCountry)
                .HasMaxLength(80);

            this.Property(t => t.FPostalCode)
                .HasMaxLength(20);

            this.Property(t => t.FPhone)
                .HasMaxLength(40);

            this.Property(t => t.FFax)
                .HasMaxLength(40);

            this.Property(t => t.FEmail)
                .HasMaxLength(40);

            this.Property(t => t.FHomePage)
                .HasMaxLength(80);

            this.Property(t => t.FCreditLimit)
                .HasMaxLength(20);

            this.Property(t => t.FTaxID)
                .HasMaxLength(40);

            this.Property(t => t.FBank)
                .HasMaxLength(255);

            this.Property(t => t.FAccount)
                .HasMaxLength(80);

            this.Property(t => t.FBrNo)
                .HasMaxLength(10);

            this.Property(t => t.FShortName)
                .HasMaxLength(50);

            this.Property(t => t.FLegalPerson)
                .HasMaxLength(50);

            this.Property(t => t.FContact)
                .HasMaxLength(50);

            this.Property(t => t.FContactAcct)
                .HasMaxLength(50);

            this.Property(t => t.FPhoneAcct)
                .HasMaxLength(50);

            this.Property(t => t.FFaxAcct)
                .HasMaxLength(50);

            this.Property(t => t.FZipAcct)
                .HasMaxLength(50);

            this.Property(t => t.FEmailAcct)
                .HasMaxLength(50);

            this.Property(t => t.FAddrAcct)
                .HasMaxLength(50);

            this.Property(t => t.FTaxNum)
                .HasMaxLength(50);

            this.Property(t => t.FCIQNumber)
                .HasMaxLength(20);

            this.Property(t => t.FName)
                .HasMaxLength(80);

            this.Property(t => t.FNumber)
                .HasMaxLength(255);

            this.Property(t => t.FShortNumber)
                .HasMaxLength(80);

            this.Property(t => t.FFavorPolicy)
                .HasMaxLength(255);

            this.Property(t => t.Fcorperate)
                .HasMaxLength(80);

            this.Property(t => t.FcashDiscount)
                .IsRequired()
                .HasMaxLength(255);

            this.Property(t => t.FCreditLevel)
                .HasMaxLength(20);

            this.Property(t => t.FRegmark)
                .HasMaxLength(255);

            this.Property(t => t.FLicence)
                .HasMaxLength(255);

            this.Property(t => t.FHelpCode)
                .HasMaxLength(50);

            this.Property(t => t.FModifyTime)
                .IsRequired()
                .IsFixedLength()
                .HasMaxLength(8)
                .IsRowVersion();

            this.Property(t => t.FNameEN)
                .HasMaxLength(255);

            this.Property(t => t.FAddrEn)
                .HasMaxLength(255);

            this.Property(t => t.FCIQCode)
                .HasMaxLength(255);

            this.Property(t => t.FMobilePhone)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("t_Supplier");
            this.Property(t => t.FItemID).HasColumnName("FItemID");
            this.Property(t => t.FAddress).HasColumnName("FAddress");
            this.Property(t => t.FCity).HasColumnName("FCity");
            this.Property(t => t.FProvince).HasColumnName("FProvince");
            this.Property(t => t.FCountry).HasColumnName("FCountry");
            this.Property(t => t.FPostalCode).HasColumnName("FPostalCode");
            this.Property(t => t.FPhone).HasColumnName("FPhone");
            this.Property(t => t.FFax).HasColumnName("FFax");
            this.Property(t => t.FEmail).HasColumnName("FEmail");
            this.Property(t => t.FHomePage).HasColumnName("FHomePage");
            this.Property(t => t.FCreditLimit).HasColumnName("FCreditLimit");
            this.Property(t => t.FTaxID).HasColumnName("FTaxID");
            this.Property(t => t.FBank).HasColumnName("FBank");
            this.Property(t => t.FAccount).HasColumnName("FAccount");
            this.Property(t => t.FBrNo).HasColumnName("FBrNo");
            this.Property(t => t.FBoundAttr).HasColumnName("FBoundAttr");
            this.Property(t => t.FErpClsID).HasColumnName("FErpClsID");
            this.Property(t => t.FShortName).HasColumnName("FShortName");
            this.Property(t => t.FPriorityID).HasColumnName("FPriorityID");
            this.Property(t => t.FPOGroupID).HasColumnName("FPOGroupID");
            this.Property(t => t.FStatus).HasColumnName("FStatus");
            this.Property(t => t.FLanguageID).HasColumnName("FLanguageID");
            this.Property(t => t.FRegionID).HasColumnName("FRegionID");
            this.Property(t => t.FTrade).HasColumnName("FTrade");
            this.Property(t => t.FMinPOValue).HasColumnName("FMinPOValue");
            this.Property(t => t.FMaxDebitDate).HasColumnName("FMaxDebitDate");
            this.Property(t => t.FLegalPerson).HasColumnName("FLegalPerson");
            this.Property(t => t.FContact).HasColumnName("FContact");
            this.Property(t => t.FContactAcct).HasColumnName("FContactAcct");
            this.Property(t => t.FPhoneAcct).HasColumnName("FPhoneAcct");
            this.Property(t => t.FFaxAcct).HasColumnName("FFaxAcct");
            this.Property(t => t.FZipAcct).HasColumnName("FZipAcct");
            this.Property(t => t.FEmailAcct).HasColumnName("FEmailAcct");
            this.Property(t => t.FAddrAcct).HasColumnName("FAddrAcct");
            this.Property(t => t.FTax).HasColumnName("FTax");
            this.Property(t => t.FCyID).HasColumnName("FCyID");
            this.Property(t => t.FSetID).HasColumnName("FSetID");
            this.Property(t => t.FSetDLineID).HasColumnName("FSetDLineID");
            this.Property(t => t.FTaxNum).HasColumnName("FTaxNum");
            this.Property(t => t.FPriceClsID).HasColumnName("FPriceClsID");
            this.Property(t => t.FOperID).HasColumnName("FOperID");
            this.Property(t => t.FCIQNumber).HasColumnName("FCIQNumber");
            this.Property(t => t.FDeleted).HasColumnName("FDeleted");
            this.Property(t => t.FSaleMode).HasColumnName("FSaleMode");
            this.Property(t => t.FName).HasColumnName("FName");
            this.Property(t => t.FNumber).HasColumnName("FNumber");
            this.Property(t => t.FParentID).HasColumnName("FParentID");
            this.Property(t => t.FShortNumber).HasColumnName("FShortNumber");
            this.Property(t => t.FARAccountID).HasColumnName("FARAccountID");
            this.Property(t => t.FAPAccountID).HasColumnName("FAPAccountID");
            this.Property(t => t.FpreAcctID).HasColumnName("FpreAcctID");
            this.Property(t => t.FlastTradeAmount).HasColumnName("FlastTradeAmount");
            this.Property(t => t.FLastRPAmount).HasColumnName("FLastRPAmount");
            this.Property(t => t.FFavorPolicy).HasColumnName("FFavorPolicy");
            this.Property(t => t.Fdepartment).HasColumnName("Fdepartment");
            this.Property(t => t.Femployee).HasColumnName("Femployee");
            this.Property(t => t.Fcorperate).HasColumnName("Fcorperate");
            this.Property(t => t.FBeginTradeDate).HasColumnName("FBeginTradeDate");
            this.Property(t => t.FEndTradeDate).HasColumnName("FEndTradeDate");
            this.Property(t => t.FLastTradeDate).HasColumnName("FLastTradeDate");
            this.Property(t => t.FLastReceiveDate).HasColumnName("FLastReceiveDate");
            this.Property(t => t.FcashDiscount).HasColumnName("FcashDiscount");
            this.Property(t => t.FcurrencyID).HasColumnName("FcurrencyID");
            this.Property(t => t.FMaxDealAmount).HasColumnName("FMaxDealAmount");
            this.Property(t => t.FMinForeReceiveRate).HasColumnName("FMinForeReceiveRate");
            this.Property(t => t.FMinReserveRate).HasColumnName("FMinReserveRate");
            this.Property(t => t.FMaxForePayAmount).HasColumnName("FMaxForePayAmount");
            this.Property(t => t.FMaxForePayRate).HasColumnName("FMaxForePayRate");
            this.Property(t => t.FdebtLevel).HasColumnName("FdebtLevel");
            this.Property(t => t.FCreditDays).HasColumnName("FCreditDays");
            this.Property(t => t.FValueAddRate).HasColumnName("FValueAddRate");
            this.Property(t => t.FPayTaxAcctID).HasColumnName("FPayTaxAcctID");
            this.Property(t => t.FDiscount).HasColumnName("FDiscount");
            this.Property(t => t.FTypeID).HasColumnName("FTypeID");
            this.Property(t => t.FCreditAmount).HasColumnName("FCreditAmount");
            this.Property(t => t.FCreditLevel).HasColumnName("FCreditLevel");
            this.Property(t => t.FStockIDAssignee).HasColumnName("FStockIDAssignee");
            this.Property(t => t.FBr).HasColumnName("FBr");
            this.Property(t => t.FRegmark).HasColumnName("FRegmark");
            this.Property(t => t.FLicAndPermit).HasColumnName("FLicAndPermit");
            this.Property(t => t.FLicence).HasColumnName("FLicence");
            this.Property(t => t.FPaperPeriod).HasColumnName("FPaperPeriod");
            this.Property(t => t.FAlarmPeriod).HasColumnName("FAlarmPeriod");
            this.Property(t => t.FOtherARAcctID).HasColumnName("FOtherARAcctID");
            this.Property(t => t.FOtherAPAcctID).HasColumnName("FOtherAPAcctID");
            this.Property(t => t.FPreARAcctID).HasColumnName("FPreARAcctID");
            this.Property(t => t.FHelpCode).HasColumnName("FHelpCode");
            this.Property(t => t.FModifyTime).HasColumnName("FModifyTime");
            this.Property(t => t.FNameEN).HasColumnName("FNameEN");
            this.Property(t => t.FAddrEn).HasColumnName("FAddrEn");
            this.Property(t => t.FCIQCode).HasColumnName("FCIQCode");
            this.Property(t => t.FRegion).HasColumnName("FRegion");
            this.Property(t => t.FMobilePhone).HasColumnName("FMobilePhone");
            this.Property(t => t.FManageType).HasColumnName("FManageType");
        }
    }
}
